.class public Lcom/xiaomi/notes/NoteAboutActivity;
.super Landroid/app/Activity;
.source "NoteAboutActivity.java"


# static fields
.field public static context:Lcom/xiaomi/notes/NoteAboutActivity;


# instance fields
.field private btnCommend:Landroid/widget/Button;

.field private txtVersion:Landroid/widget/TextView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 14
    const/4 v0, 0x0

    sput-object v0, Lcom/xiaomi/notes/NoteAboutActivity;->context:Lcom/xiaomi/notes/NoteAboutActivity;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 13
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 16
    iput-object v0, p0, Lcom/xiaomi/notes/NoteAboutActivity;->btnCommend:Landroid/widget/Button;

    .line 18
    iput-object v0, p0, Lcom/xiaomi/notes/NoteAboutActivity;->txtVersion:Landroid/widget/TextView;

    return-void
.end method

.method private initListener()V
    .locals 5

    .prologue
    .line 32
    :try_start_0
    sget-object v2, Lcom/xiaomi/notes/NoteAboutActivity;->context:Lcom/xiaomi/notes/NoteAboutActivity;

    invoke-virtual {v2}, Lcom/xiaomi/notes/NoteAboutActivity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteAboutActivity;->getPackageName()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 33
    .local v1, pinfo:Landroid/content/pm/PackageInfo;
    const v2, 0x7f070009

    invoke-virtual {p0, v2}, Lcom/xiaomi/notes/NoteAboutActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/xiaomi/notes/NoteAboutActivity;->txtVersion:Landroid/widget/TextView;

    .line 34
    iget-object v2, p0, Lcom/xiaomi/notes/NoteAboutActivity;->txtVersion:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, " v"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 39
    .end local v1           #pinfo:Landroid/content/pm/PackageInfo;
    :goto_0
    const v2, 0x7f07000a

    invoke-virtual {p0, v2}, Lcom/xiaomi/notes/NoteAboutActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/Button;

    iput-object v2, p0, Lcom/xiaomi/notes/NoteAboutActivity;->btnCommend:Landroid/widget/Button;

    .line 40
    iget-object v2, p0, Lcom/xiaomi/notes/NoteAboutActivity;->btnCommend:Landroid/widget/Button;

    new-instance v3, Lcom/xiaomi/notes/NoteAboutActivity$1;

    invoke-direct {v3, p0}, Lcom/xiaomi/notes/NoteAboutActivity$1;-><init>(Lcom/xiaomi/notes/NoteAboutActivity;)V

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 47
    return-void

    .line 35
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 36
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    invoke-virtual {v0}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V

    goto :goto_0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 1
    .parameter "savedInstanceState"

    .prologue
    .line 22
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 24
    sput-object p0, Lcom/xiaomi/notes/NoteAboutActivity;->context:Lcom/xiaomi/notes/NoteAboutActivity;

    .line 25
    const v0, 0x7f030004

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteAboutActivity;->setContentView(I)V

    .line 27
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteAboutActivity;->initListener()V

    .line 28
    return-void
.end method
